<script setup lang="ts">
// 主应用组件
import ChatbotComponent from './components/ChatbotComponent.vue'
</script>

<template>
  <div class="phone-container">
    <div class="phone-frame">
      <div class="phone-content">
        <router-view />
      </div>
      <ChatbotComponent />
    </div>
  </div>
</template>

<style>
/* 全局样式重置 */
html, body, * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #e0e0e0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#app {
  width: 100%;
  height: 100%;
}

.phone-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background-color: #e0e0e0;
  position: fixed;
  top: 0;
  left: 0;
}

.phone-frame {
  width: 375px;
  height: 667px;
  background-color: #ffffff;
  border-radius: 48px;
  border: 12px solid #000000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 手机顶部装饰条 */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 20px;
  background-color: #000000;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  z-index: 1;
}

/* 手机底部装饰条 */
.phone-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background-color: #000000;
  border-radius: 2px;
}

.phone-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: 10px;
  width: 100%;
  position: relative;
}

/* 隐藏滚动条但保留滚动功能 */
.phone-content::-webkit-scrollbar {
  display: none;
}
.phone-content {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 响应式调整 */
@media (max-width: 480px) {
  .phone-frame {
    width: 100%;
    height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  
  .phone-frame::before,
  .phone-frame::after {
    display: none;
  }
}
</style>
